<html>
    <head>

    </head>
    <body>
        <script>
            var stu={
                id:1,
                name:"张三",
                age:18
            }
            
            for(var i in stu){
                document.write(i+","+stu[i]+"<br />");
            }
            with(stu){
                document.write(id+","+name+","+age);
            }
        </script>
    </body>
</html>